翻訳と辞書
Words near each other
・ February 18
・ February 18 (Eastern Orthodox liturgics)
・ February 19
・ February 19 (Eastern Orthodox liturgics)
・ February 1900
・ February 1901
・ February 1902
・ February 1909
・ February 1910
・ February 1911
・ Feature creep
・ Feature data
・ Feature detection
・ Feature detection (computer vision)
・ Feature detection (nervous system)
Feature detection (web development)
・ Feature engineering
・ Feature extraction
・ Feature film
・ Feature Films for Families
・ Feature Funnies
・ Feature geometry
・ Feature group
・ Feature hashing
・ Feature integration theory
・ Feature interaction problem
・ Feature learning
・ Feature length
・ Feature levels in Direct3D
・ Feature model


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Feature detection (web development) : ウィキペディア英語版
Feature detection (web development)

Feature detection (also feature testing) is a technique used in web development for handling differences between runtime environments (typically web browsers or user agents), by programmatically testing for clues that the environment may or may not offer certain functionality. This information is then used to make the application adapt in some way to suit the environment: to make use of certain APIs, or tailor for a better user experience.
Its proponents claim it is more reliable and future-proof than other techniques like user agent sniffing and browser-specific CSS hacks.
==Techniques==

A feature test can take many forms. It is essentially ''any'' snippet of code which gives some level of confidence that a required feature is indeed supported. However, in contrast to other techniques, feature detection usually focusses on performing actions which directly relate to the feature to be detected, rather than heuristics.
As JavaScript is the most prevalent scripting language in web browsers, many feature detection techniques use JavaScript to inspect the DOM and local JavaScript environment.
The simplest technique is to check for the existence of a relevant object or property. For example, the Geolocation API (used for accessing the device’s knowledge of its geographical location, possibly obtained from a GPS navigation device) exposes a geolocation property on the navigator object in the DOM; the presence of which implies the Geolocation API is supported:

if ('geolocation' in navigator)

For a higher level of confidence, some feature tests will attempt to invoke the feature then look for clues that it behaved properly. For example, a test for support for cookies might attempt to set a value as a cookie and then verify it can be read back.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Feature detection (web development)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.